#ifndef RGUI_RENDER_OBJECT_HANDLER_HPP
#define RGUI_RENDER_OBJECT_HANDLER_HPP

#include <vector>
#include "vec2.hpp"

namespace rgui
{

class RenderObject;
class System;

class RenderObjectHandler
{
private:
	static void add(rgui::RenderObject *renderObject);
	static void remove(rgui::RenderObject *renderObject);

	static void onMousePressed(const rgui::vec2i &cursorPosition);
	static void onMouseReleased(const rgui::vec2i &cursorPosition);
	static void update(const rgui::vec2i &cursorPosition);
	static void render();

	friend class rgui::System;
	friend class rgui::RenderObject;
private:
	typedef std::vector<rgui::RenderObject*> RenderObjects;
	static RenderObjects renderObjects;
};

}

#endif